package ra_interface;


public class PasswordStrengthCheck {
	
	
	public boolean password_strength( String password){
		
		int strength = 0;
		
		for ( char ch : password.toCharArray())
		{
			if (Character.isUpperCase(ch)){
				strength++;
				break;
			}
		}
		for ( char ch : password.toCharArray())
		{
			if (Character.isLowerCase(ch)){
				strength++;
				break;
			}
		}
		for ( char ch : password.toCharArray())
		{
			if (Character.isDigit(ch)){
				strength++;
				break;
			}
		}		
		
		if (password.length() >= 8){
			strength++;
		}
		
		System.out.println(strength);
		
		if (strength > 3){
			return true;
		} else{
			return false;
		}
		
	}
}
